<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<div class="container bs-docs-container" style="margin-top: 20px">
    @if ($errors->any())
        <div class="alert alert-danger">
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif
    <a href="{{ route('permission.index') }}" type="button" class="btn btn-primary pull-right">返回列表</a>
    <form method="post" action="{{ route('permission.update',$permission->id) }}">
        {{ csrf_field() }}
        {{ method_field('PATCH') }}
        <div class="form-group">
            <label for="exampleInputEmail1">权限中文名</label>
            <input type="text" name="alias" class="form-control" value="{{ old('alias', $permission->alias) }}">
        </div>
        <div class="form-group">
            <label for="exampleInputEmail1">权限API</label>
            <input type="text" name="name" class="form-control"  value="{{ old('name', $permission->name) }}" >
        </div>
        <div class="form-group">
            <label for="exampleInputEmail1">父ID</label>
            <input type="text" name="parent_id" class="form-control" value="{{ $permission->parent_id }}"  placeholder="存在就填">
        </div>
        <button type="submit" class="btn btn-primary">Submit</button>
    </form>
</div>